﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace LJX.SmartPark.EntityFramework.Migrations
{
    public partial class create21 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_EquipmentTypes",
                table: "EquipmentTypes");

            migrationBuilder.RenameTable(
                name: "EquipmentTypes",
                newName: "EquipmentType");

            migrationBuilder.AlterColumn<string>(
                name: "TypeName",
                table: "EquipmentType",
                type: "nvarchar(max)",
                nullable: false,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AlterColumn<bool>(
                name: "IsDelete",
                table: "EquipmentType",
                type: "bit",
                nullable: false,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AddPrimaryKey(
                name: "PK_EquipmentType",
                table: "EquipmentType",
                column: "Id");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_EquipmentType",
                table: "EquipmentType");

            migrationBuilder.RenameTable(
                name: "EquipmentType",
                newName: "EquipmentTypes");

            migrationBuilder.AlterColumn<int>(
                name: "TypeName",
                table: "EquipmentTypes",
                type: "int",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)");

            migrationBuilder.AlterColumn<int>(
                name: "IsDelete",
                table: "EquipmentTypes",
                type: "int",
                nullable: false,
                oldClrType: typeof(bool),
                oldType: "bit");

            migrationBuilder.AddPrimaryKey(
                name: "PK_EquipmentTypes",
                table: "EquipmentTypes",
                column: "Id");
        }
    }
}
